package com.mall.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.mall.db.domain.memberFootprint;
import com.mall.db.service.MemberFootprintService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/system/mf")
public class memberFootprintController extends BaseController<memberFootprint>{
    @Resource(name = "memberFootprintService")
    private MemberFootprintService ms;

    @Override
    public Map<String, Object> find(memberFootprint mf) {
        PageHelper.startPage(mf.getPage(),mf.getLimit());
        QueryWrapper qw = new QueryWrapper();
        List<memberFootprint> list = ms.list(qw);
        PageInfo page = new PageInfo(list,mf.getLimit());
        return findMap(page.getList(), page.getTotal());
    }
}
